@use './variables.module.scss' as *;
.left-heard, .main-herard{
  width: 100%;
  padding: 0 $padding-md;
  height: $sub-navbar-height;
  border-bottom: 1px solid #e4e7ed;
}

.container-body {
  height: 100%;
  background: #fff;
  border: solid $border-color;
  border-width: 0 1px 0 1px;
}

.main-container {
  padding: 20px;
  background-color: #f5f7fa;
  height: $main-view-height;
  overflow-y: auto;
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;

    .header-left {
      .page-title {
        margin: 0;
        font-size: 24px;
        font-weight: 600;
        color: #303133;
      }
    }

    .header-right {
      .op-btn {
        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
        }

        &:active {
          transform: translateY(0);
        }
      }
      .add-btn {
        background: linear-gradient(135deg, #409eff 0%, #66b3ff 100%);
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
      }
      .edit-btn {
        background: linear-gradient(135deg, #67c23a 0%, #95e583 100%);
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
      }
      .delete-btn {
        background: linear-gradient(135deg, #f56c6c 0%, #fa9d9d 100%);
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
      }
      .import-btn,
      .export-btn,
      .warning-btn {
        background: linear-gradient(135deg, #e6a23c 0%, #ffd8ab 100%);
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        font-weight: 500;
        transition: all 0.3s ease;
      }

      .info-btn,
      .default-btn {
        background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        font-weight: 500;
        color: #333;
        transition: all 0.3s ease;
      }
    }
  }

  .table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;

    .ward-table {
      border-radius: 8px;

      :deep(.el-table__header) {
        background-color: #f8f9fa;

        th {
          background-color: #f8f9fa !important;
          color: #606266;
          font-weight: 600;
          border-bottom: 2px solid #e4e7ed;
        }
      }

      :deep(.el-table__body) {
        tr {
          transition: background-color 0.2s ease;

          &:hover {
            background-color: #f5f7fa;
          }
        }

        td {
          border-bottom: 1px solid #ebeef5;
        }
      }

      .edit-btn {
        color: #409eff;
        margin-right: 8px;

        &:hover {
          color: #66b3ff;
        }
      }

      .delete-btn {
        color: #f56c6c;

        &:hover {
          color: #f78989;
        }
      }
    }
  }

  .queryParams-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 20px 0;

    .ward-queryParams {
      :deep(.el-pager li) {
        border-radius: 4px;
        margin: 0 2px;
        transition: all 0.2s ease;

        &:hover {
          background-color: #409eff;
          color: white;
        }

        &.is-active {
          background-color: #409eff;
          color: white;
        }
      }

      :deep(.btn-prev),
      :deep(.btn-next) {
        border-radius: 4px;
        transition: all 0.2s ease;

        &:hover {
          background-color: #409eff;
          color: white;
        }
      }
    }
  }
  .page-content {
    height: $main-view-height;
    padding: $padding-lg;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .ward-management {
    padding: 16px;

    .page-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;

      .header-left {
        .page-title {
          font-size: 20px;
        }
      }

      .header-right {
        width: 100%;

        .add-ward-btn {
          width: 100%;
          justify-content: center;
        }
      }
    }

    .table-container {
      overflow-x: auto;

      .ward-table {
        min-width: 800px;
      }
    }

    .ward-dialog {
      :deep(.el-dialog) {
        width: 95% !important;
        margin: 5vh auto;
      }
    }
  }
}

@media (max-width: 480px) {
  .ward-management {
    padding: 12px;

    .page-header {
      .header-left {
        .page-title {
          font-size: 18px;
        }
      }
    }

    .queryParams-container {
      .ward-queryParams {
        :deep(.el-queryParams) {
          justify-content: center;
          flex-wrap: wrap;
        }
      }
    }
  }
}
